public class Test05 {
    public static void main(String[] args) {
        1.  int n=100;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += i;
        }
        System.out.println(sum);
        2.int n=100;
        int sum=0;
        int i=0;
        while (i<=n){
            sum+=i++;
        }
        System.out.println(sum);
        3. int n = 100;
        int sum = 0;
        int i = 0;
        do {
            sum += i++;
        }
        while (i <= n);
        System.out.println(sum);

    }
}
